﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ShortestPath
{
    class Position
    {
        //IComparable getValue();
    }

    interface PriorityQueue
    {
        /**
         * Returns the value stored at this position.
         * @return the value stored at this position.
         */

        Position position
        {
            get;
            set;
        }
        
        

   /**
   * The Position interface represents a type that can
   * be used for the decreaseKey operation.
   */  
        /**
         * Insert into the priority queue, maintaining heap order.
         * Duplicates are allowed.
         * @param x the item to insert.
         * @return may return a Position useful for decreaseKey.
         */
        Position insert(IComparable x);

        /**
         * Find the smallest item in the priority queue.
         * @return the smallest item.
         * @throws UnderflowException if empty.
         */
        IComparable findMin();

        /**
         * Remove the smallest item from the priority queue.
         * @return the smallest item.
         * @throws UnderflowException if empty.
         */
        IComparable deleteMin();

        /**
         * Test if the priority queue is logically empty.
         * @return true if empty, false otherwise.
         */
        bool isEmpty();

        /**
         * Make the priority queue logically empty.
         */
        void makeEmpty();

        /**
         * Returns the size.
         * @return current size.
         */
        int size();

        void decreaseKey(Position p, IComparable newVal);
    }
}
